﻿#ifndef TCP_H
#define TCP_H

#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QThread>
namespace Ui {
class Tcp;
}

class Tcp : public QWidget
{
    Q_OBJECT
public:
    explicit Tcp(QTcpSocket *tcpSocket, QString myID, QWidget *parent = nullptr);
    ~Tcp();
private:
    Ui::Tcp *ui;    //添加的对象
    QTcpSocket *tcpSocket;
    QString client_IP;
    QString myID;

private slots:
    //void newConnection_Slot();    //添加的槽函数
    void readyRead_Slot();
    //void on_openButton_clicked();
    //void on_closeButton_clicked();
    void on_sendButton_clicked();
    void on_SendFileButton_clicked();
    void on_recvButton_clicked();
    void on_disconnected();
};

#endif // TCP_H
